package app.myproject.model;

import java.util.Date;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;
import com.google.appengine.api.datastore.KeyFactory;

@PersistenceCapable(detachable="true")
public class NotificationVO implements java.io.Serializable {
	
	private static final long serialVersionUID = 1L;

	@PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Key key;
	
	@Persistent
    private String name;

	@Persistent
    private String url;
	
	@Persistent
    private String description;
	
	@Persistent
    private String status;

	@Persistent
    private Boolean enabled;

	@Persistent
    private String email;
	
	@Persistent
	private Date created;
	
	@Persistent
	private String owner;

	public NotificationVO() {
		super();
	}
	
	public Key getKey() {
		return key;
	}

	public String getKeyAsString() {
		return key != null ? KeyFactory.keyToString(key) : null;
	}
	
	public void setKey(Key key) {
		this.key = key;
	}


	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public Boolean getEnabled() {
		return enabled;
	}

	public void setEnabled(Boolean enabled) {
		this.enabled = enabled;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}
	
	public Date getCreated() {
		return created;
	}

	public void setCreated(Date created) {
		this.created = created;
	}
	
	public String getOwner() {
		return owner;
	}

	public void setOwner(String owner) {
		this.owner = owner;
	}

//	public String toString() {
//		return key != null ? KeyFactory.keyToString(key) : null;
//	}
	
}